package com.future.orm.executor;

import com.future.orm.mapping.MappedStatement;
import com.future.orm.session.Configuration;

import java.sql.SQLException;
import java.util.List;

/**
 * 执行器
 *
 * @author shiyong
 * 2020/5/26 15:26
 */
public interface Executor {
    int update(Configuration configuration, MappedStatement mappedStatement, Object[] param) throws SQLException, NoSuchFieldException, IllegalAccessException;

    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object[] param) throws Exception;

    void commit() throws SQLException;

    void rollback() throws SQLException;

    void close() throws SQLException;
}
